#include <REGX52.H>
#include "LCD1602.h"
#include "XPT2046.h"
#include "Delay.h"

void main()
{
	unsigned int ADValue;
	LCD_Init();
	LCD_ShowString(1,1,"ADJ   NTC  GR ");
	LCD_ShowString(2,1,"000   000  000");
    while(1)
    {
//        ADValue = XPT2046_ReadAD(XPT2046_8_XP);		//读取可调电阻
//		LCD_ShowNum(2, 1, ADValue, 4);
		ADValue = XPT2046_ReadAD(XPT2046_12_XP);	//读取可调电阻
		LCD_ShowNum(2, 1, ADValue, 4);
		ADValue = XPT2046_ReadAD(XPT2046_8_YP);		//读取热敏电阻
		LCD_ShowNum(2, 7, ADValue, 3);
		ADValue = XPT2046_ReadAD(XPT2046_8_VBAT);	//读取光明电阻
		LCD_ShowNum(2, 12, ADValue, 3);
		Delayms(100);
    }
}